<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
	<title>铁水联运信息核查系统--登录</title>
    <link rel="shortcut icon" href="${mainDomain}/statics/images/favicon.ico">
    <link rel="stylesheet" href="${mainDomain}/statics/css/front/custom.css">
    <link rel="stylesheet" href="${mainDomain}/statics/css/front/amazeui.min.css"/>
    <link rel="stylesheet" href="${mainDomain}/statics/css/front/goodsstyle.css">    
    <script type="text/javascript">
        var mainDomain = "${mainDomain}";
		var miscDomain = '${mainDomain}';
    </script>
</head>
<body style="background:url(${mainDomain}/statics/images/ts-bg.jpg) no-repeat center top">
<!-- 头部导航 begin -->
<div id="logo"></div>
<!-- 头部导航 end -->
<!-- 登录 begin -->

<div id="xtdl-bg" class="xtdl-bg">
    <div id="xtdl-title" class="xtdl-title">
  		<form id="my-form" action="javascript:;" method="post" class="am-form" data-am-validator >
	      <input type="hidden" name="myurl" id="myurl" value="${(url)!''}"/>
	      <input type="hidden" name="csid" id="csid" value="${(ymid)!''}"/>
	      <input type="hidden" id="tourl" name="tourl" value="${tourl}"/>
	      <input type="hidden" id="hdurl" name="hdurl" value="${hdurl}"/>
	      <table>
	      <tr style="margin-bottom:15px;">
	       <td class="td01"> <label for="yhid">用户名:</label></td>
	       <td><input type="text" name="yhid" id="yhid"/></td>
	      </tr>
	      <tr>
	      <td class="td01"><label for="password">密&nbsp;&nbsp;&nbsp;码:</label></td>
	      <td><input type="password" name="mm" id="mm" id="password"/></td>
	      </tr>
	      <tr>
	      <td colspan="2">
	      <div class="am-cf">
	        <button type="sumbit" id="saveButton" class="am-btn am-btn-primary am-btn-xs">登&nbsp;&nbsp;录</button>
	        <!--<button type="sumbit" id="forgetButton" class="am-btn am-btn-primary am-btn-xs">忘记密码</button>-->
	      </td>
	      </div>
	      </tr>
	      <tr>
	      <td colspan="2">
	      <div id="zczh" style="width:150px;float:right;font-size:14px;margin-top:20px;" class="text">
	                <p style="margin:0;"><span style="color:#555;">没有账号？</span><a href="/login/registerindex" style="text-decoration:underline;color:#555;">立即注册</a></p>
	       </div>
	       </td>
	       </tr>
	       </table>      
	    </form>	
    </div>
  
  
  <div id="tzgg-title">
  	<div class="inlow">		
		<div class="lowleft">
			<div class="incont">
				<a href="/front/findArticleListBySection/1/2"><h6>联运新闻</h6><span>更多>></span></a>
			</div>			
		</div>
		<div class="lowright">
			<div class="incont">
				<a href="/front/findArticleListBySection/1/3"><h6>通知公告</h6><span>更多>></span></a>
			</div>
		</div>		
	</div>
  </div>
</div>
<!-- 登录 end -->
<!-- 底部 begin -->
<div id="footer" class="footer"><br>版权所有：武汉新港管理委员会&nbsp;&nbsp;&nbsp;&nbsp;电子邮件: whnp@whxg.gov.cn <br> 维护单位:武汉新港管理委员会信息中心&nbsp;&nbsp;&nbsp;&nbsp; 办公地址：武汉市汉口沿江大道69号长航集团大厦20楼</div>
<!-- 底部 end -->
  
<script type="text/javascript" src="${mainDomain}/statics/js/front/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="${mainDomain}/statics/js/front/amazeui.min.js"></script>
	<script type="text/javascript" src="${mainDomain}/statics/js/front/btsb/login.js"></script>
    <script>
	$('#my-form').validator({
		
        
        submit: function() {
        	if(this.isFormValid()){
        	var url = $("#myurl").val();
        	var csid = $("#csid").val();
        	var tourl = $("#tourl").val();
        	var userid = $("#yhid").val();
        	if(url=="/"||url=="")
        	{
        		if(tourl!="")
        		{
        			url = tourl;
        		}
        		else
        		{
        			url = "/btsb/addhzindex";
        		}		
        	}
        	
        	$.ajax( {  
	        type : 'POST',  
	        url : '/login/login',  
	        data : $('#my-form').serialize(),  
	        success : function(data) {  
	        	var msg = data.message;
	        	if(msg==1)
        		{
	        		alert('登录成功');
	        		        		
	        		if(csid!=null&&csid!="")
	        		{
	        			window.location.href=url+ "?hzdh=" + csid;
	        		}
	        		else
	        		{
	        			window.location.href=url;
	        		}        		
        		}
        		else if(msg==-1)
        		{
        			alert("请根据步骤填写信息!");
        			window.location.href="/login/" + data.tostep +"?userid=" + userid;
        		}
        		else if(msg==-2)
        		{
        			alert("审核未通过!");
        		}
	        	else if(msg==-3)
        		{
		        	alert("登录失败，请核对您的用户名和密码");
        		}else
        		{
        			alert(msg);	
        		} 
	        },  
	        error : function(data) {  
	          alert("登录失败")  
	        }  
	      });
        }
        }
        
       
    })
	</script>
</body>
</html>
